// @ts-ignore
import { api } from '@/utils/api';

/** 新增系统通知配置数据 POST /sysMessageNotification/add */
export async function sysMessageNotificationAdd(
  body: BASE.SysMessageNotificationCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysMessageNotificationAdd(
  body: BASE.SysMessageNotificationCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysMessageNotificationAdd(
  body: BASE.SysMessageNotificationCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysMessageNotificationAdd(
  body: BASE.SysMessageNotificationCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysMessageNotification/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysMessageNotification/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除系统通知配置数据 POST /sysMessageNotification/delete */
export async function sysMessageNotificationDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysMessageNotificationDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysMessageNotificationDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysMessageNotificationDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysMessageNotification/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysMessageNotification/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统通知配置VO数据 POST /sysMessageNotification/getVo */
export async function sysMessageNotificationGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultSysMessageNotificationResp>;

export async function sysMessageNotificationGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultSysMessageNotificationResp>>;

export async function sysMessageNotificationGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultSysMessageNotificationResp>;

export async function sysMessageNotificationGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultSysMessageNotificationResp>(`/app/sysMessageNotification/getVo`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultSysMessageNotificationResp>(`/app/sysMessageNotification/getVo`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统通知配置分页数据 POST /sysMessageNotification/page */
export async function sysMessageNotificationPage(
  body: BASE.SysMessageNotificationQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultIPageSysMessageNotificationEntity>;

export async function sysMessageNotificationPage(
  body: BASE.SysMessageNotificationQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultIPageSysMessageNotificationEntity>>;

export async function sysMessageNotificationPage(
  body: BASE.SysMessageNotificationQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultIPageSysMessageNotificationEntity>;

export async function sysMessageNotificationPage(
  body: BASE.SysMessageNotificationQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultIPageSysMessageNotificationEntity>(`/app/sysMessageNotification/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultIPageSysMessageNotificationEntity>(`/app/sysMessageNotification/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 更新系统通知配置数据 POST /sysMessageNotification/update */
export async function sysMessageNotificationUpdate(
  body: BASE.SysMessageNotificationUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysMessageNotificationUpdate(
  body: BASE.SysMessageNotificationUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysMessageNotificationUpdate(
  body: BASE.SysMessageNotificationUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysMessageNotificationUpdate(
  body: BASE.SysMessageNotificationUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysMessageNotification/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysMessageNotification/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
